package com.jnu.erp.framework.web.domain;

import com.jnu.erp.framework.web.exception.IResultCode;

import java.io.Serializable;

/**
 * 公共错误代码
 */
public enum ApiResultCode implements IResultCode, Serializable {
    SUCCESS(20000, "一切OK"),
    FAILED(40001, "业务异常"),
    ;

    /**
     * 返回码
     */
    private final int code;
    /**
     * 错误码说明
     */
    private final String message;

    ApiResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
